package com.example.jetpack_viewmodel_livedata

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

class MyLiveDataViewModel : ViewModel() {
    private var currentSecond: MutableLiveData<Int>? = null
    fun getCurrSecond(): MutableLiveData<Int> {
        if (currentSecond == null) {
            currentSecond = MutableLiveData()
            currentSecond!!.value = 0
        }
        return currentSecond!!
    }
}